<?php
require_once("../lib/func.autoloader.php");
// logout.php
// SuperConstructor logout page.
// Copyright 2007, Alex McClung
$sc = new SuperConstructor();

// If the user is not logged in, redirect them to the login page
// (there really wouldn't be a point in logging someone out who
// isn't logged in)
if(false === $sc->getUser()) { header("Location: {$sc->config->LoginPage}"); exit(); }

// Log the user out
$sc->logOut();

// Clear the bindings to make sure they're not displayed in the template
$sc->clear_assign("_user");

// Show the template page
$sc->display("admin/pages/logout.tpl");
?>